/**
 * Created by tzx on 2016/11/30.
 */
var path = require('path');
function getFilePath(fileName) {
    return path.join(__dirname,'../../'+fileName);
}

var structure = require(getFilePath("routes/index"));

module.exports =function (app) {
    app.all('*', function(req, res, next) {
        res.header("Access-Control-Allow-Origin", "*");
        res.header("Access-Control-Allow-Headers", "X-Requested-With");
        res.header("Access-Control-Allow-Methods","PUT,POST,GET,DELETE,OPTIONS");
        res.header("X-Powered-By",' 3.2.1');
        res.header("Content-Type", "application/json;charset=utf-8");
        next();
    });

    app.use('/linkingois/api/v1/structure/ROIPlane', structure);
};